home *** CD-ROM | disk | FTP | other *** search
/ PC Graphics Unleashed / PC Graphics Unleashed.iso / ch17 / pi / roomfly / picframe.inc < prev    next >
Encoding:
Text File  |  1994-08-04  |  1.6 KB  |  84 lines

  1. // Polyray include file: PICFRAME.INC
  2. // by Rob McGregor
  3. //
  4. // A picture frame definition and two canvasses...
  5.  
  6. static define picture_frame
  7. object {
  8.   // BOX
  9.   object {
  10.     box <-1, -1, -1>, <1, 1, 1>
  11.     scale <1.0, 11.25, 0.25>
  12.     translate <14.0, -0.064, 0.0>
  13.     wooden
  14.   }
  15. +
  16.   // BOX
  17.   object {
  18.     box <-1, -1, -1>, <1, 1, 1>
  19.     scale <1.0, 11.25, 0.25>
  20.     translate <-14.0, -0.064, 0.0>
  21.     wooden
  22.   }
  23. +
  24.   // BOX
  25.   object {
  26.     box <-1, -1, -1>, <1, 1, 1>
  27.     scale <15.0, 1.0, 0.25>
  28.     translate <0.064, 12.2496, 0.0>
  29.     wooden { rotate <0, 0, 90> }
  30.   }
  31. +
  32.   // BOX
  33.   object {
  34.     box <-1, -1, -1>, <1, 1, 1>
  35.     scale <15.0, 1.0, 0.25>
  36.     translate <0.0, -12.3136, 0.0>
  37.     wooden { rotate <0, 0, 90> }
  38.   }
  39. }
  40.  
  41. static define picture1_tex
  42. texture {
  43.   special surface {
  44.     color planar_imagemap(image("pedvenus.tga"),P)
  45.   }
  46. }
  47.  
  48. static define picture2_tex
  49. texture {
  50.   special surface {
  51.     color planar_imagemap(image("bathsphr.tga"),P)
  52.   }
  53. }
  54.  
  55. static define picture1
  56. object {
  57.   object { picture_frame }
  58. +
  59.   // Canvas
  60.   object {
  61.     // normal in Y direction
  62.     polygon 4, <0, 0, 0>, <1, 0, 0>, <1, 0, 1>, <0, 0, 1>
  63.     scale <26, 1, 22.5>
  64.     picture1_tex
  65.     rotate <-90, 0, 0>
  66.     translate <-13, -11.25, 0.25>
  67.   }
  68. }
  69.  
  70. static define picture2
  71. object {
  72.   object { picture_frame }
  73. +
  74.   // Canvas
  75.   object {
  76.     // normal in Y direction
  77.     polygon 4, <0, 0, 0>, <1, 0, 0>, <1, 0, 1>, <0, 0, 1>
  78.     scale <26, 1, 22.5>
  79.     picture2_tex
  80.     rotate <-90, 0, 0>
  81.     translate <-13, -11.25, 0.25>
  82.   }
  83. }
  84.